package com.desksoft.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.desksoft.entity.ArticleType;
import com.desksoft.service.ArticleTypeService;

/**
 * 首页
 * @author forever
 *
 */
@Controller
@RequestMapping(value="/page")
public class HomeController {

	@Autowired
	ArticleTypeService articleTypeService;
	
	
	@RequestMapping(value="/home/index",method=RequestMethod.GET)
	public String home(HttpServletRequest request){
		List<ArticleType> articeTypeList = 	articleTypeService.queryAllArticelType();
		request.setAttribute("articeTypeList", articeTypeList);
		return "/page/index.jsp";
	}
	
}
